package org.ccay.core.base;

import java.util.Date;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlTransient;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;

/**
 * 基本资源VO，含有创建人（ID和名）、创建日期、修改人（ID和名）、修改日期等信息
 * 此类中禁止继续添加新的字段，会影响SOAP服务的兼容性。
 */
@XmlAccessorType(XmlAccessType.FIELD)
@JsonIgnoreProperties(ignoreUnknown=true,value={"appName","scope","currentUserId","createdBy","lastUpdatedBy"})
public class BaseResourceVO extends BaseVO {
	 
	private static final long serialVersionUID = -20171123L;

	/**
	 * 创建人user Id，对应 tpl_user_t 的 user_id 字段
	 */
	private Long createdBy;

	/**
	 * 创建时间，对应 creation_date 字段
	 */
	private Date creationDate;
	
	/**
	 * 创建人名
	 */
	private String creationUser;

	/**
	 * 最后更新人user Id，对应 tpl_user_t 的 user_id 字段
	 */
	private Long lastUpdatedBy;
 
	/**
	 * 最后更新时间，对应 last_update_date 字段
	 */
	private Date lastUpdateDate;
	
	/**
	 * 最后更新人名
	 */
	private String lastUpdateUser;
	

	// 行号索引，对应Grid中的行号
	@XmlTransient
	private Integer rowIdx = -1;

	/**
	 * @return createdBy
	 */
	public Long getCreatedBy() {
		return createdBy;
	}

	/**
	 * @param createdBy 要设置的 createdBy
	 */
	public void setCreatedBy(Long createdBy) {
		this.createdBy = createdBy;
	}

	/**
	 * @return creationDate
	 */
	public Date getCreationDate() {
		return creationDate;
	}

	/**
	 * @param creationDate 要设置的 creationDate
	 */
	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	/**
	 * @return lastUpdatedBy
	 */
	public Long getLastUpdatedBy() {
		return lastUpdatedBy;
	}

	/**
	 * @param lastUpdatedBy 要设置的 lastUpdatedBy
	 */
	public void setLastUpdatedBy(Long lastUpdatedBy) {
		this.lastUpdatedBy = lastUpdatedBy;
	}

	/**
	 * @return lastUpdateDate
	 */
	public Date getLastUpdateDate() {
		return lastUpdateDate;
	}

	/**
	 * @param lastUpdateDate 要设置的 lastUpdateDate
	 */
	public void setLastUpdateDate(Date lastUpdateDate) {
		this.lastUpdateDate = lastUpdateDate;
	}
	

	/**
	 * 获取行号	
	 * @return
	 */
	public Integer getRowIdx() {
		return rowIdx;
	}

	/**
	 * 设置行号	
	 * @param rowIndex
	 */
	public void setRowIdx(Integer rowIndex) { 
		this.rowIdx = rowIndex;
	}

	/**
	 * @return the creationUser
	 */
	public String getCreationUser() {
		return creationUser;
	}

	/**
	 * @param creationUser the creationUser to set
	 */
	public void setCreationUser(String creationUser) {
		this.creationUser = creationUser;
	}

 
	/**
	 * @return the lastUpdateUser
	 */
	public String getLastUpdateUser() {
		return lastUpdateUser;
	}

	/**
	 * @param lastUpdateUser the lastUpdateUser to set
	 */
	public void setLastUpdateUser(String lastUpdateUser) {
		this.lastUpdateUser = lastUpdateUser;
	}
}
